package com.agiantii.ablog.handler.article.filter.impl;

import com.agiantii.ablog.handler.article.filter.ContentFilter;
import com.agiantii.ablog.pojo.dto.PostDTO;
import com.agiantii.ablog.util.StringUtil;
import org.springframework.stereotype.Component;

@Component
public class TitleFilter implements ContentFilter {
    @Override
    public void doFilter(PostDTO content) {
        if (StringUtil.isEmpty(content.getTitle())) {
            throw new IllegalArgumentException("孩子 你是不是忘记写标题了？");
        }

    }
} 